package cm.kafka.entity;

import lombok.Data;

import java.util.Date;

@Data
public class AuditLog {
    private String id;
    //事件接收时间
    private Date eventAcceptTime;
    //用户名称
    private String username;
    //源地址
    private String sourceAddress;
    //源端口
    private Integer sourcePort;
    //操作
    private String operation;
    //目的端口
    private Integer destinationPort;
    // 目的地址
    private String destinationAddress;
    //对象
    private String object;
    //结果
    private String result;
    //持续时间
    private Integer duration;
    //响应时间
    private String response;
    //发送流量
    private Long sendTraffic;
    // 接收流量
    private Long receiveTraffic;
    // 归并数目
    private Integer mergeCount;
    //事件名称
    private String eventName;
    //事件摘要
    private String eventDiest;
    //事件分类
    private String eventType;
    //采集类型
    private String collectionType;
    //等级
    private String level;
    //原始等级
    private String originLevel;
    //原始事件分类
    private String originType;
    //产生时间
    private Date occurTime;
    //监控数值
    private Double monitorValue;
    //网络协议
    private String protocol;
    //网络应用协议
    private String applicationProtocol;
    //源转换ip地址
    private String sourceTransferAddress;
    //源名称
    private String sourceName;
    //源MAC地址
    private String sourceMac;
    //源转换端口
    private Integer sourceTransferPort;
    //目的名称
    private String destinationName;
    //目的MAC地址
    private String destinationMac;
    //目的转换ip地址
    private String destinationTrasferAddress;
    //目的转换端口
    private Integer destinationTrasferPort;
    //设备地址
    private String deviceAddress;
    //设备名称
    private String deviceName;
    //设备类型
    private String deviceType;
    //程序名称
    private String program;
    //采集器ip地址
    private String collectionAddress;
    //请求内容
    private String requestMessage;
    //原始消息
    private String eventMessage;
    //备用长整型1
    private Long extendLong1;
    //备用长整型2
    private Long extendLong2;
    //备用长整型3
    private Long extendLong3;
    //备用长整型4
    private Long extendLong4;
    //备用长整型5
    private Long extendLong5;
    //备用长整型6
    private Long extendLong6;
    //备用整型1
    private String extendInteger1;
    //备用整型2
    private String extendInteger2;
    //备用整型3
    private String extendInteger3;
    //备用整型4
    private String extendInteger4;
    //备用整型5
    private String extendInteger5;
    //备用整型6
    private String extendInteger6;
    //备用字符串1
    private String extendString1;
    //备用字符串2
    private String extendString2;
    //备用字符串3
    private String extendString3;
    //备用字符串4
    private String extendString4;
    //备用字符串5
    private String extendString5;
    //备用字符串6
    private String extendString6;
    //备用字符串7
    private String extendString7;
    //备用字符串8
    private String extendString8;
    //备用字符串9
    private String extendString9;
    //备用字符串10
    private String extendString10;
    //备用字符串11
    private String extendString11;
    //备用字符串12
    private String extendString12;
    //备用双精度1
    private String extendDouble1;
    //备用双精度2
    private String extendDouble2;

    private String batchId;

    //地理位置增强属性
    private String src_country_code;
    private String src_country;
    private String src_province;
    private String src_city;
    private Boolean src_ip_assert;
    private Boolean src_ip_lan;
    private String src_latitude;
    private String src_longitude;
    private String dst_country_code;
    private String dst_country;
    private String dst_province;
    private String dst_city;
    private Boolean dst_ip_assert;
    private Boolean dst_ip_lan;
    private String dst_latitude;
    private String dst_longitude;
    private String assert_name;
    private String group_name;

    public AuditLog() {}

    //BeanUtils.copyProperties 使用这个速度会有影响,10000条数据耗时500ms左右
    public AuditLog(EventLog eventLog) {
        this.id = eventLog.getId();
        this.eventAcceptTime = eventLog.getEventAcceptTime();
        this.username = eventLog.getUsername();
        this.sourceAddress = eventLog.getSourceAddress();
        this.sourcePort = eventLog.getSourcePort();
        this.operation = eventLog.getOperation();
        this.destinationPort = eventLog.getDestinationPort();
        this.destinationAddress = eventLog.getDestinationAddress();
        this.object = eventLog.getObject();
        this.result = eventLog.getResult();
        this.duration = eventLog.getDuration();
        this.response = eventLog.getResponse();
        this.sendTraffic = eventLog.getSendTraffic();
        this.receiveTraffic = eventLog.getReceiveTraffic();
        this.mergeCount = eventLog.getMergeCount();
        this.eventName = eventLog.getEventName();
        this.eventDiest = eventLog.getEventDiest();
        this.eventType = eventLog.getEventType();
        this.collectionType = eventLog.getCollectionType();
        this.level = eventLog.getLevel();
        this.originLevel = eventLog.getOriginLevel();
        this.originType = eventLog.getOriginType();
        this.occurTime = eventLog.getOccurTime();
        this.monitorValue = eventLog.getMonitorValue();
        this.protocol = eventLog.getProtocol();
        this.applicationProtocol = eventLog.getApplicationProtocol();
        this.sourceTransferAddress = eventLog.getSourceTransferAddress();
        this.sourceName = eventLog.getSourceName();
        this.sourceMac = eventLog.getSourceMac();
        this.sourceTransferPort = eventLog.getSourceTransferPort();
        this.destinationName = eventLog.getDestinationName();
        this.destinationMac = eventLog.getDestinationMac();
        this.destinationTrasferAddress = eventLog.getDestinationTrasferAddress();
        this.destinationTrasferPort = eventLog.getDestinationTrasferPort();
        this.deviceAddress = eventLog.getDeviceAddress();
        this.deviceName = eventLog.getDeviceName();
        this.deviceType = eventLog.getDeviceType();
        this.program = eventLog.getProgram();
        this.collectionAddress = eventLog.getCollectionAddress();
        this.requestMessage = eventLog.getRequestMessage();
        this.eventMessage = eventLog.getEventMessage();
        this.extendLong1 = eventLog.getExtendLong1();
        this.extendLong2 = eventLog.getExtendLong2();
        this.extendLong3 = eventLog.getExtendLong3();
        this.extendLong4 = eventLog.getExtendLong4();
        this.extendLong5 = eventLog.getExtendLong5();
        this.extendLong6 = eventLog.getExtendLong6();
        this.extendInteger1 = eventLog.getExtendInteger1();
        this.extendInteger2 = eventLog.getExtendInteger2();
        this.extendInteger3 = eventLog.getExtendInteger3();
        this.extendInteger4 = eventLog.getExtendInteger4();
        this.extendInteger5 = eventLog.getExtendInteger5();
        this.extendInteger6 = eventLog.getExtendInteger6();
        this.extendString1 = eventLog.getExtendString1();
        this.extendString2 = eventLog.getExtendString2();
        this.extendString3 = eventLog.getExtendString3();
        this.extendString4 = eventLog.getExtendString4();
        this.extendString5 = eventLog.getExtendString5();
        this.extendString6 = eventLog.getExtendString6();
        this.extendString7 = eventLog.getExtendString7();
        this.extendString8 = eventLog.getExtendString8();
        this.extendString9 = eventLog.getExtendString9();
        this.extendString10 = eventLog.getExtendString10();
        this.extendString11 = eventLog.getExtendString11();
        this.extendString12 = eventLog.getExtendString12();
        this.extendDouble1 = eventLog.getExtendDouble1();
        this.extendDouble2 = eventLog.getExtendDouble2();
    }

}
